Skip to content

Fix GH-22115: Tracing JIT drops loop-PHI CV register from SNAPSHOT#22132

Open
wilaak wants to merge 1 commit into
php:PHP-8.4from
wilaak:fix-gh22115-jit-loop-phi-snapshot
Open

Fix GH-22115: Tracing JIT drops loop-PHI CV register from SNAPSHOT#22132
wilaak wants to merge 1 commit into
php:PHP-8.4from
wilaak:fix-gh22115-jit-loop-phi-snapshot

Conversation

@wilaak
Copy link
Copy Markdown

@wilaak wilaak commented May 22, 2026

Fixes GH-22115.

Extends the existing loop-PHI pre-pass to clear ZREG_LAST_USE on every SSA version of any loop-carried CV, not just phi->sources[1]. Intermediate versions from opcodes with op1_def under RC inference (SEND_VAR, QM_ASSIGN, CAST, etc.) were keeping the flag and tripping cleanup_stack mid-loop.

Hmm why so many no-op macros lurking here? Looks like leftovers from the new 8.4 IR stuff that was added. Not touching that.

Is a quick fix, NOT AN EXPERT. Needs expertise

@wilaak wilaak requested a review from dstogov as a code owner May 22, 2026 21:32
@wilaak wilaak changed the base branch from master to PHP-8.4 May 22, 2026 21:35
@wilaak wilaak force-pushed the fix-gh22115-jit-loop-phi-snapshot branch from 8346f8e to 52ab97c Compare May 22, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracing JIT drops loop-PHI CV register from SNAPSHOT after intermediate op1_def

1 participant